// pages/reserve/reserve.js
Page({
  /**
   * 页面的初始数据
   */
  data: {
    imgUrls: [
      'http://img02.tooopen.com/images/20150928/tooopen_sy_143912755726.jpg',
      'http://img06.tooopen.com/images/20160818/tooopen_sy_175866434296.jpg',
      'http://img06.tooopen.com/images/20160818/tooopen_sy_175833047715.jpg'
    ],
    circular: false,
    interval: 3000,
    duration: 500,
    isDisplay:'none',
    SimgUrl:'../../images/xiala.png',
    XimgUrl:'../../images/shangla.png',
    defau:{},
    choice:[
      {
        rid:'0',
        name:'张三',
        ress:'北京朝阳区望京A座8011',
        phone:'15939080226'
      },
      {
        rid: '1',
        name: '李四',
        ress: '北京朝阳区望京A座8012',
        phone: '15939080226'
      },
      {
        rid: '2',
        name: '王二麻子',
        ress: '北京朝阳区望京A座8012',
        phone: '15939080226'
      },
      {
        rid: '3',
        name: '哈哈哈',
        ress: '北京朝阳区望京A座8012',
        phone: '15939080226'
      },
      {
        rid: '3',
        name: '哈哈哈',
        ress: '北京朝阳区望京A座8012',
        phone: '15939080226'
      },
      {
        rid: '3',
        name: '哈哈哈',
        ress: '北京朝阳区望京A座8012',
        phone: '15939080226'
      },
      {
        rid: '3',
        name: '哈哈哈',
        ress: '北京朝阳区望京A座8012',
        phone: '15939080226'
      }
    ],
  },
  /**
   * 生命周期函数--监听页面加载
   */
  onLoad: function (options) {
    // console.log(options)
    // console.log(this.data.choice)
    this.setData({
      defau: this.data.choice[0]
    })
  },
  /**
   * 用户点击右上角分享
   */
  onShareAppMessage: function () {

  },
  onDisplay:function(e){
    if (this.data.isDisplay == 'none'){
      this.setData({isDisplay:'block'})
    }else{
      this.setData({ isDisplay: 'none'})
    }
  },
  onChoice:function(e){
    // console.log(e.currentTarget.dataset)
    this.setData({
      defau: e.currentTarget.dataset,
      isDisplay: 'none',
    })
  }
})